#include "precompile.h"

#include "TextEventHandler.h"
#include "command/arg/TextItemArgument.h"

TextEventHandler::TextEventHandler()
{
}

TextEventHandler::~TextEventHandler()
{
}

Tracker* TextEventHandler::BeginTrack()
{
	return new RectTracker();
}

bool TextEventHandler::EndTrack(SystemEventArgs* /*e*/,const Point& begin,const Point& end)
{
	Point rbegin = interaction->CalcRelativePoint(begin);
	Point rend = interaction->CalcRelativePoint(end);

	TextItemArgument arg(rbegin,rend,L"frwerrwer");
	GetApplication()->GetController()->ExecuteCommand(Commands::CreateTextItem,&arg);
	return true;
}